import {
  Create,
  DelById,
  Update,
  GetList,
  GetEditById,
  CustomApi,
} from "./baseApi";

/**
#region 
*/
export const GetCoreCmsStoreList = (params) => GetList("CoreCmsStore", params);

export const DelStoreById = (id) => DelById("CoreCmsStore", id);

export const AddStore = (params) => Create("CoreCmsStore", params);

export const GetStoreById = (id) => GetEditById("CoreCmsStore", id);

export const EditStore = (params) => Update("CoreCmsStore", params);

export const GetGroupStoreList = (params) =>
  CustomApi("CoreCmsStore", "GetGroupStoreList", params, false);

export const DoCreateByGroup = (params) =>
  CustomApi("CoreCmsStore", "DoCreateByGroup", params, true);

/**
#region 
*/
export const GetStoreMarket = (params) =>
  CustomApi("CoreCmsStoreMarket", "GetEdit", params, false);

export const AddStoreMarket = (params) => Create("CoreCmsStoreMarket", params);

/**
#region 
*/
export const GetIndustryList = (params) => GetList("CoreCmsIndustry", params);

/**
#region 
*/
export const GetSysUserList = (params) => GetList("SysUser", params);

export const DelSysUserById = (id) => DelById("SysUser", id);

export const AddSysUser = (params) => Create("SysUser", params);

export const GetSysUserById = (id) => GetEditById("SysUser", id);

export const EditSysUser = (params) => Update("SysUser", params);

export const ResetPassword = (params) =>
  CustomApi("SysUser", "ResetPassword", params, true);

/**
#region 
*/
export const GetSysRoleList = (params) => GetList("SysRole", params);

export const DelSysRoleById = (id) => DelById("SysRole", id);

export const AddSysRole = (params) => Create("SysRole", params);

export const GetSysRoleById = (id) => GetEditById("SysRole", id);

export const EditSysRole = (params) => Update("SysRole", params);

/**
#region 
*/
export const GetPlatformSetting = (params) =>
  CustomApi("CoreCmsUserIntegralRules", "GetInfoByContext", params);

export const EditSUserIntegralRules = (params) =>
  Update("CoreCmsUserIntegralRules", params);

export const Editstoresetting = (params) =>
  Update("corecmsstoresetting", params);
